package com.lxyk.mapper.impl;

import com.lxyk.mapper.StudentCRUDMapper;
import com.lxyk.pojo.Student;
import org.mybatis.spring.SqlSessionTemplate;

import java.util.List;

public class StudentCRUDImpl implements StudentCRUDMapper {

    private SqlSessionTemplate sqlSession;

    public void setSessionTemplate(SqlSessionTemplate sqlSession)
    {
        this.sqlSession = sqlSession;
    }
    @Override
    public List<Student> selectAll() {
        StudentCRUDMapper mapper = sqlSession.getMapper(StudentCRUDMapper.class);
        return mapper.selectAll();

    }
}
